#! /bin/sh
#### Run GBmod with Xwindow Graphics

# model number
model=3

datadir=../datadir/
rayendsfile=${datadir}rayend.data
rayfile=${datadir}ray.data
modelfile=${datadir}model${model}.data

nangle=50 nxz=301 fangle=30 langle=45

####   generate modelfile
#../Models/Xmodel${model}

####   shoot the rays
triray <$modelfile >$rayendsfile \
        rayfile=$rayfile nangle=$nangle \
        nxz=$nxz xs=0.1 zs=0.1 fangle=$fangle\
        langle=$langle refseq=4,1

xgraph linecolor=3 <$rayfile -geom 600x450+670+520 nplot=`cat outpar` n=$nxz \
        x1beg=0 x1end=1 x2beg=0 x2end=2 \
        label1="Depth (km)" label2="Distance (km)" title="Raypaths" \
        style=seismic linecolor=3 &

#### Create X-Windows display of model
sxplot <$modelfile -geom 600x450+670+0 tricolor=none \
        label1="Depth (km)" label2="Distance (km)"  \
	title"4 Media Model" &


exit 0
